﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PurposeGrid.aspx.cs" Inherits="FantastPlatform.Community.UI.Setting.PurposeGrid" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
       // var Disabled = true;
//        if (AdminI == "True")
//            Disabled = false;
        var pg = new FantastPlatform.UI.PurposeGrid({
            renderTo: 'pg_div',
            url: '../Service/PurposeService.aspx?Action=Search',
            border: false,
            width: tabs.getInnerWidth() - 5,
            height: tabs.getInnerHeight() - 5,
            tbar: [{
                text: '添加',
                iconCls: 'add',
                disabled: Disabled,
                id: 'btnPurposeadd',
                tooltip: {
                    text: '添加场所类型',
                    title: '添加场所类型',
                    autoHide: true
                },
                handler: function () { pg.onAddPurposeGridClick(); }
            }, '-', {
                text: '编辑',
                iconCls: 'edit',
                disabled: Disabled,
                id: 'btnPurposeedit',
                tooltip: {
                    text: '选择要编辑的记录',
                    title: '编辑场所类型',
                    autoHide: true
                },
                handler: function () { pg.onEditPurposeGridClick(); }
            }, '-', {
                text: '删除',
                iconCls: 'delete',
                disabled: Disabled,
                id: 'btnPurposedeletes',
                tooltip: {
                    text: '删除选中的记录',
                    title: '删除场所类型',
                    autoHide: true
                },
                handler: function () { pg.onDeletePurposeGridClick(); }
            }, '-', {
                text: '刷新',
                iconCls: 'updata',
                tooltip: {
                    text: '重新更新列表内容',
                    title: '列表刷新',
                    autoHide: true
                },
                handler: function () { pg.onUpdataPurposeGridClick(); }
            }]
        });
        if (AdminI == "True"){
            pg.addListener('rowdblclick', function () { pg.onEditPurposeGridClick(); });
        }
        pg.onUpdataPurposeGridClick();  
    </script>
</head>
<body>
    <div id="pg_div">
    
    </div>
</body>
</html>
